<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>任务截止提醒</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
        }
        .header {
            border-bottom: 1px solid #eee;
            padding-bottom: 10px;
            margin-bottom: 20px;
        }
        .content {
            background-color: #f9f9f9;
            border-radius: 5px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .footer {
            font-size: 12px;
            color: #666;
            border-top: 1px solid #eee;
            padding-top: 10px;
            margin-top: 20px;
        }
        .highlight {
            color: #f5222d;
            font-weight: bold;
        }
        .button {
            display: inline-block;
            padding: 10px 20px;
            background-color: #1890ff;
            color: white !important;
            text-decoration: none;
            border-radius: 4px;
            margin-top: 15px;
        }
        .info {
            background-color: #e6f7ff;
            border: 1px solid #91d5ff;
            padding: 10px 15px;
            border-radius: 4px;
            margin: 15px 0;
        }
        .warning {
            background-color: #fff7e6;
            border: 1px solid #ffd591;
            padding: 10px 15px;
            border-radius: 4px;
            margin: 15px 0;
        }
        .requirements {
            background-color: #f6ffed;
            border: 1px solid #b7eb8f;
            padding: 10px 15px;
            border-radius: 4px;
            margin: 15px 0;
        }
    </style>
</head>
<body>
    <div class="header">
        <h2 th:text="${systemName}">高校文件收集系统</h2>
    </div>
    
    <div class="content">
        <p>
            <strong><span th:text="${studentName}">同学</span></strong>，您好：
        </p>
        
        <div class="warning">
            <p>您有一个任务即将截止，请注意及时提交！</p>
        </div>

        <div class="info">
            <p><strong>任务名称：</strong><span th:text="${taskName}"></span></p>
            <p><strong>截止时间：</strong><span th:text="${#dates.format(deadline, 'yyyy-MM-dd HH:mm:ss')}"></span></p>
            <p><strong>剩余时间：</strong><span class="highlight" th:text="${timeLeft}"></span></p>
        </div>

        <div class="requirements" th:if="${fileRequirements != null and fileRequirements != ''}">
            <p><strong>文件要求：</strong></p>
            <p th:text="${fileRequirements}"></p>
        </div>

        <div class="requirements" th:if="${submitRequirements != null and submitRequirements != ''}">
            <p><strong>提交要求：</strong></p>
            <p th:text="${submitRequirements}"></p>
        </div>

        <a th:href="${submissionUrl}" class="button">立即前往提交</a>
    </div>

    <div class="footer">
        <p>此邮件由系统自动发送，请勿回复。</p>
        <p>发送时间：<span th:text="${#dates.format(date, 'yyyy-MM-dd HH:mm:ss')}"></span></p>
    </div>
</body>
</html> 